<template>
	<section :is="crtComponent" :svg-dept-id="svgDeptId" @jump-page="fnJumpPage" @go-back="fnGoBack"></section>
</template>

<script>
    import List from '../../components/serviceDept/List.vue'
    import Detail from '../../components/serviceDept/Detail.vue'
    import Clerk from '../../components/serviceDept/Clerk.vue'
	export default {
		data() {
			return {
				crtComponent : 'list', //当前组件
				svgDeptId : 0 //当前id（0默认为新增）
			}
		},
		components:{
			List,Detail,Clerk
		},
		methods: {
			//自定义方法->组件切换
			fnJumpPage(id,nextComponent){
				var that = this
				that.svgDeptId = id
				that.crtComponent = nextComponent
			},
			//自定义方法->组件返回
			fnGoBack(nextComponent){
				var that = this
				that.crtComponent = nextComponent
			}
		},
		mounted() {
			
		}
	}
</script>

<style scoped>
</style>